package com.zkingsoft.rhi.utils;

import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author xieguo
 * @since 2020/11/10 9:35
 */

@Component
public class MyUtils {

    /**
     * @author xieguo
     * 功能描述：多个id处理为list集合
     * @param ids
     * @return java.util.List<java.lang.Integer>
     * @date 2020/11/18 10:53
     */
    public List<Integer> handleIds(String ids){
        String[] split = ids.split(",");
        List<String> strings = Arrays.asList(split);
        return strings.stream().map(Integer::valueOf).collect(Collectors.toList());
    }
}
